package com.chagee.store.operation.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @Author : hk
 * @Date : 2024/7/11
 */

@Getter
@AllArgsConstructor
public enum EnableFlagEnum {

	START(1, "启用"),
	STOP(0, "禁用"),
	;
	private final Integer type;
	private final String desc;


	public static EnableFlagEnum queryByType(Integer type) {
		for (EnableFlagEnum value : values()) {
			if (Objects.equals(type, value.getType())) {
				return value;
			}
		}
		return null;
	}
}
